#version 140

in vec3 	in_Vertex;
in vec3 	in_Color;
in vec3		in_Normal;
in vec3		in_Texture;

uniform mat4	UniMatModelview;
uniform mat4	UniMatProjection;
uniform mat3	UniMatNormal;

uniform vec3	UniLightPosition;
uniform vec3	UniEyePosition;

uniform vec3	UniColorDiffuse;
uniform vec3	UniColorAmbient;
uniform vec3	UniColorSpecular;

smooth out vec3	out_Color;

void	main()
{
	mat3	matNormal = transpose(inverse(UniMatNormal));
	vec3	vertexNormal = UniMatNormal * in_Normal;

	vec4	vertexPos4 = UniMatProjection * UniMatModelview * vec4(in_Vertex, 1.0);
	vec3	vertexPos = vertexPos4.xyz / vertexPos4.w;


	out_Color = vertexNormal;
	gl_Position = UniMatProjection * UniMatModelview * vec4(in_Vertex, 1.0);
}